package org.jeecg.modules.mobile.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.basic.material.entity.BasicMaterial;
import org.jeecg.modules.basic.print.entity.WmsDocumentTypeStatus;
import org.jeecg.modules.basic.warehouse.entity.WmsBasicWarehouse;
import org.jeecg.modules.basic.warehouse.entity.WmsBasicWarehouseArea;
import org.jeecg.modules.business.doc.business.entity.WmsInReceipt;
import org.jeecg.modules.business.doc.outbound.entity.WmsOutReceipt;
import org.jeecg.modules.business.doc.outbound.entity.vo.OutboundReceiptLoadCheckFullVO;
import org.jeecg.modules.business.outbound.entity.vo.OutboundTaskUnPickVO;
import org.jeecg.modules.business.repertory.entity.WmsRepertory;
import org.jeecg.modules.business.warehouse.entity.vo.ListByMaterialIdOutVO;
import org.jeecg.modules.business.warehouse.entity.vo.ListByMaterialIdResponseVO;
import org.jeecg.modules.mobile.entity.vo.*;

import java.util.HashMap;
import java.util.List;

/**
 * @Description: 移动端-我的任务
 * @Author: jeecg-boot
 * @Date:   2023-08-24
 * @Version: V1.0
 */
public interface IMobileMyTaskService {

    /**
     * 根据批次号查询物料信息
     * @param wmsInReceiptTaskId
     * @param batchCode
     * @return
     */
    BasicMaterial getMaterialByBatch(String wmsInReceiptTaskId, String batchCode);

    /**
     * 查询用户的任务列表
     * @return
     */
    List<MobileMyTaskVO> listMyTask(String warehouseId, String status);

    /**
     * 查询用户的单据列表
     * @return
     */
    List<MobileMyDocumentVO> listMyDocument(String warehouseId, String type);

    /**
     * 查询用户所属仓库
     * @param userId
     * @return
     */
    List<WmsBasicWarehouse> getWarehouse(String userId);

    /**
     * 首页统计数据
     * @param userId
     * @param warehouseId
     * @return
     */
    MobileHomePageVO getHomePage(String userId, String warehouseId);

    /**
     * 库存查询
     * @param vo
     * @return
     */
    IPage<WmsRepertory> queryRepertory(Page<WmsRepertory> pageList, MobileRepertoryParamVO vo);

    /**
     * 入库任务出库任务小红点
     * @param warehouseId
     * @return
     */
    HashMap<String, Object> getRedNum(String warehouseId);

    /**
     * 任务查询
     * @param vo
     * @return
     */
    Page<MobileMyTaskVO> queryTask(Page<MobileMyTaskVO> page, MobileTaskParamVO vo);

    /**
     * 扫码查询库区库位
     * @param name
     * @param warehouseId
     * @return
     */
    MobileWarehouseVO queryWarehouse(String name, String warehouseId);

    /**
     * 查询所有状态
     * @param type
     * @return
     */
    List<WmsDocumentTypeStatus> queryAllStatus(String type);

    /**
     * 查询入库任务关联入库单列表
     * @param id
     * @return
     */
    List<WmsInReceipt> queryInReceipt(String id, String name);

    /**
     * 查询出库任务关联出库单列表
     * @param id
     * @return
     */
    List<WmsOutReceipt> queryOutReceipt(String id, String name);

    /**
     * 安灯
     */
    void lightOn(List<InReceiptStrategyWarehouseVO> list);

    /**
     * 查询仓库是否有默认库区
     * @param warehouseId
     * @return
     */
    WmsBasicWarehouseArea getDefaultArea(String warehouseId);

    /**
     * 入库扫托盘码
     * @param taskId
     * @param code
     * @return
     */
    List<ListByMaterialIdResponseVO> inTrayCode(String taskId, String code);

    /**
     * 出库扫托盘码
     * @param taskId
     * @param code
     * @return
     */
    List<ListByMaterialIdOutVO> outTrayCode(String taskId, String code);

    /**
     * 移库扫托盘码
     * @param code
     * @return
     */
    List<WmsRepertory> moveTrayCode(String code);

    /**
     * 拣货扫托盘码
     * @return
     */
    List<OutboundTaskUnPickVO> pickTrayCode(String taskId, String code);

    /**
     * 装车复核扫托盘码
     * @return
     */
    List<OutboundReceiptLoadCheckFullVO> checkTrayCode(String taskId, String code, String carNumber);
}
